package ar.fiuba.tp7552.buildadmin.webactions.users;

import java.util.Collection;

import ar.fiuba.tp7552.buildadmin.model.auth.User;
import ar.fiuba.tp7552.buildadmin.service.UserService;
import ar.fiuba.tp7552.buildadmin.webactions.BaseAction;

public class ListUsersAction extends BaseAction {
	
	private UserService userService;
	private Collection<User> users;
	
	// ~~ Constructor ====================================================
	
	public ListUsersAction(UserService userService) {
		super();
		this.userService = userService;
	}
	
	
	public String getAllUsers() {
		users = userService.getAll();
		return BaseAction.SUCCESS;
	}

	// ~~ getters y setters ==============================================
	
	public Collection<User> getUsers() {
		return users;
	}
	
}
